# Contributor: Edd Salkield <edd@salkield.uk>
# Maintainer: Edd Salkield <edd@salkield.uk>
pkgname=vit
pkgver=2.3.2
pkgrel=1
pkgdesc="Lightweight, fast, curses-based front end to Taskwarrior"
url="https://github.com/vit-project/vit"
arch="noarch"
license="MIT"
depends="python3 py3-tasklib py3-urwid"
makedepends="py3-gpep517 py3-setuptools py3-wheel"
subpackages="$pkgname-pyc"
source="https://github.com/vit-project/vit/archive/v$pkgver/vit-v$pkgver.tar.gz"

build() {
	gpep517 build-wheel --wheel-dir .dist --output-fd 3 3>&1 >&2
}

check() {
	export TERM=xterm-256color
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m unittest -v
}

package() {
	python3 -m installer -d "$pkgdir" .dist/*.whl
}

sha512sums="
029311eb0ae67b8bd0b6e41715c85a1883d6d11218f45f7637e3f6f049c6eb022858adc3c72455c3bd1d9de39638926026b8849b9ed7e0b04406362fda836817  vit-v2.3.2.tar.gz
"
